package com.atguigu.cloud.order.controller;

import com.atguigu.cloud.order.entity.Order;
import com.atguigu.cloud.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LT
 * @create 2023-11-13-18:18
 */
@RestController
@RequestMapping("/api/order")
public class OrderController {

    @Autowired
    OrderService orderService;

    @GetMapping("/findOrderByOrderId/{Id}")
    public Order findOrderByOrderId(@PathVariable("Id") Long Id){
        return orderService.findOrderByOrderId(Id);
    }

}
